package com.liao.badminton.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.liao.badminton.code.PageParam;
import com.liao.badminton.code.ProjectException;
import com.liao.badminton.code.ResponseRest;
import com.liao.badminton.dto.BadmintonGroupDto;
import com.liao.badminton.entity.BadmintonGroup;
import com.liao.badminton.vo.BadmintonGroupVo;

import java.util.List;

/**
* @author liaocheng
* @date 2024-10-31
* description:群表
*/
public interface BadmintonGroupService extends IService<BadmintonGroup> {
	/**
     * 新增
     */
	 Long saveBadmintonGroup(BadmintonGroupDto param)throws ProjectException;
	/**
     * 修改
     */
	 ResponseRest updateBadmintonGroup(BadmintonGroupDto param)throws ProjectException;
	/**
     * 查询列表
     */
	 ResponseRest findBadmintonGroupByPageParam(PageParam<BadmintonGroupDto> PageParam)throws ProjectException;
    /**
    * 查询详情
    */
    ResponseRest findDetail(BadmintonGroupDto param)throws ProjectException;
	/**
     * 删除
     */
	 ResponseRest deletesBadmintonGroup(BadmintonGroupDto param)throws ProjectException;

	BadmintonGroup findBadmintonGroupByCode(String groupCode);


	 void updateCompetitionNum(Long groupId, Integer num);
	 void updateActiveNum(Long groupId, Integer num);

	ResponseRest getListByUserId(PageParam<BadmintonGroupDto>  body);


	List<BadmintonGroupVo> findGroupByUserId(Long userId);
}
